home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / pascal / pcl4p33.zip / PCL4P.PAS < prev    next >
Pascal/Delphi Source File  |  1992-05-23  |  4KB  |  158 lines

  1. unit PCL4P;
  2.  
  3. interface
  4.  
  5. const
  6.    (* COMM Ports *)
  7.    COM1 = 0;
  8.    COM2 = 1;
  9.    COM3 = 2;
  10.    COM4 = 3;
  11.    (* Baud Rate Codes *)
  12.    NORESET  = -1;
  13.    Baud300  = 0;
  14.    Baud600  = 1;
  15.    Baud1200 = 2;
  16.    Baud2400 = 3;
  17.    Baud4800 = 4;
  18.    Baud9600 = 5;
  19.    Baud19200  = 6;
  20.    Baud38400  = 7;
  21.    Baud57600  = 8;
  22.    Baud115200 = 9;
  23.    (* Parity Codes *)
  24.    NoParity  = 0;
  25.    OddParity = 1;
  26.    EvenParity= 3;
  27.    (* Stop Bit Codes *)
  28.    OneStopBit  = 0;
  29.    TwoStopBits = 1;
  30.    (* Word Length Codes *)
  31.    WordLength5 = 0;
  32.    WordLength6 = 1;
  33.    WordLength7 = 2;
  34.    WordLength8 = 3;
  35.    (* Buffer Size Codes *)
  36.    Size8    = 0;
  37.    Size16   = 1;
  38.    Size32   = 2;
  39.    Size64   = 3;
  40.    Size128  = 4;
  41.    Size256  = 5;
  42.    Size512  = 6;
  43.    Size1024 = 7;
  44.    Size2048 = 8;
  45.    Size4096 = 9;
  46.    Size8192 =  10;
  47.    Size16384 = 11;
  48.    Size32768 = 12;
  49.    Size1K = 7;
  50.    Size2K = 8;
  51.    Size4K = 9;
  52.    Size8K = 10;
  53.    Size16K = 11;
  54.    Size32K = 12;
  55.    (* Line Status Masks *)
  56.    TransBufferEmpty = $20;
  57.    BreakDetect  = $10;
  58.    FramingError = $08;
  59.    ParityError  = $04;
  60.    OverrunError = $02;
  61.    DataReady    = $01;
  62.    (* Modem Status Masks *)
  63.    DCD = $80;
  64.    RI  = $40;
  65.    DSR = $20;
  66.    CTS = $10;
  67.    DeltaDCD = $08;
  68.    DeltaRI  = $04;
  69.    DeltaDSR = $02;
  70.    DeltaCTS = $01;
  71.    (* Break Signal Commands *)
  72.    ASSERT = 'A';
  73.    CANCEL = 'C';
  74.    DETECT = 'D';
  75.    (* SioDTR & SioRTS Commands *)
  76.    SetPort = 'S';
  77.    ClrPort = 'C';
  78.    ReadPort = 'R';
  79.    (* FIFO level codes *)
  80.    LEVEL_1 =  0;
  81.    LEVEL_4 =  1;
  82.    LEVEL_8 =  2;
  83.    LEVEL_14 = 3;
  84.    (* Primary / Secondary IRQ codes *)
  85.    PRIMARY   = 0;
  86.    SECONDARY = 1;
  87.    (* SioInfo arguments *)
  88.    VERSION = 'V';
  89.    (* timeing constants *)
  90.    ONE_SECOND = 18;
  91.    SHORT_WAIT = 3;
  92.    LONG_WAIT = 10;
  93.  
  94. function SioBaud(Port, BaudCode : Integer) : Integer;
  95. function SioBrkKey : Boolean;
  96. function SioBrkSig(Port : Integer; Cmd : Char) : Integer;
  97. function SioCTS(Port : Integer) : Integer;
  98. function SioDCD(Port : Integer) : Integer;
  99. function SioDelay(Tics : Integer) : Integer;
  100. function SioDone(Port : Integer) : Integer;
  101. function SioDSR(Port : Integer) : Integer;
  102. function SioDTR(Port : Integer; Cmd : Char) : Integer;
  103. function SioError(Code : Integer) : Integer;
  104. function SioFIFO(Port, Code : Integer) : Integer;
  105. function SioFlow(Port, Tics : Integer) : Integer;
  106. function SioGetc(Port, Tics : Integer) : Integer;
  107. function SioInfo(Cmd : Char) : Integer;
  108. function SioIRQ(Port, Code : Integer) : Integer;
  109. function SioLine(Port : Integer) : Integer;
  110. function SioLoopBack(Port : Integer) : Integer;
  111. function SioModem(Port : Integer; Mask : Char) : Integer;
  112. function SioParms(Port, ParityCode, StopBitsCode, WordLengthCode : Integer) : Integer;
  113. function SioPutc(Port : Integer; Ch : Char) : Integer;
  114. function SioReset(Port, BaudCode : Integer) : Integer;
  115. function SioRI(Port : Integer) : Integer;
  116. function SioRTS(Port : Integer; Cmd : Char ) : Integer;
  117. function SioRxBuf(Port, BufferOfs, BufferSeg, SizeCode : Integer) : Integer;
  118. function SioRxFlush(Port : Integer) : Integer;
  119. function SioRxQue(Port : Integer) : Integer;
  120. function SioTimer : LongInt;
  121. function SioUART(Port, Address : Integer) : Integer;
  122. function SioUnGetc(Port : Integer; Ch : Byte ) : Integer;
  123.  
  124.  
  125. implementation
  126.  
  127. {$L PCL4PLIB}
  128.  
  129. function SioBaud ; external;
  130. function SioBrkKey ; external;
  131. function SioBrkSig ; external;
  132. function SioCTS ; external;
  133. function SioDCD ; external;
  134. function SioDelay ; external;
  135. function SioDone ; external;
  136. function SioDSR ; external ;
  137. function SioDTR ; external;
  138. function SioError ; external;
  139. function SioFIFO ; external;
  140. function SioFlow ; external;
  141. function SioGetc ; external;
  142. function SioInfo ; external;
  143. function SioIRQ ; external;
  144. function SioLine ; external;
  145. function SioLoopBack ; external;
  146. function SioModem ; external;
  147. function SioParms ; external;
  148. function SioPutc ; external;
  149. function SioReset ; external;
  150. function SioRI ; external;
  151. function SioRTS ; external;
  152. function SioRxBuf ; external;
  153. function SioRxFlush ; external;
  154. function SioRxQue ; external;
  155. function SioTimer ; external;
  156. function SioUART ; external;
  157. function SioUnGetc ; external;
  158. end.